<style>
#reportDuznici form{
	width:320px;
}
#reportDuznici form input[type=submit]{
	float:right;
	clear:both;
}
#reportDuznici form input[type=checkbox]{
	margin-top:10px;
}
#reportDuznici form label{
	width:50px;
	text-align:right;
	clear:both;
}
#reportDuznici form #filter_uplata{
	width:15px;
	display:none;
}
#reportDuznici form #info{
	float:left;
	font-size:11px;
	color:#aaa;
	margin-top:20px;
}
#reportDuznici #mainContainer{
	margin-left:2px;
	width:700px;
	overflow:auto;
}
#reportDuznici #mainContainer table{
	font-size:11px;
}
#reportDuznici #mainContainer tr.head td{
	text-align:center;
}
#reportDuznici #mainContainer td{
	vertical-align:top;
}
#reportDuznici #mainContainer td.napomena{
	font-size:11px;
}
</style>
<div id="reportDuznici">
	<form action="javascript:void(0)" onsubmit="submitForm(this,'duznici.php','POST','setContent',1)"  class="area">
		<input type="hidden" name="a" value="report" />
		<h1>Izveštaj dužnici</h1>
		
		<label class="left" for="filter_datum">datum:</label>
		<input type="text" name="filter_datum" id="filter_datum" value="{{$filter_datum}}" />
		<input type="button" class="datePicker" onclick="displayDatePicker('filter_datum',this)" />
		
		<label class="left" for="filter_ugovor">ugovor:</label>
		<input type="text" name="filter_ugovor" id="filter_ugovor" value="{{$filter_ugovor}}" />
		
		<label class="left" for="filter_komitent">komitent:</label>
		<input type="text" name="filter_komitent" id="filter_komitent" value="{{$filter_komitent}}" />
		
		<label class="left" for="filter_kontakt">kontakt:</label>
		<input type="text" name="filter_kontakt" id="filter_kontakt" value="{{$filter_kontakt}}" />
		
		<label class="left" for="filter_odgovor">odgovor:</label>
		<select name="filter_odgovor" id="filter_odgovor" onchange="onChangeOdgovor(this)">
			<option value="-1">---</option>
			{{%loop start odgovor_id}}
			<option value="{{$odgovor_id}}" {{$odgovor_selected}}>{{$odgovor_name}}</option>
			{{%loop end}}
		</select>
		<input style="{{$uplata_display}}" onfocus="this.value=trim(this.value)" type="text" name="filter_uplata" id="filter_uplata" value="{{$filter_uplata}}" maxlength="2" />
		
		<label style="width:auto" class="left" for="filter_obuplata">obećana uplata:</label>
		<select name="filter_obuplata" id="filter_obuplata">
			<option value="-1">--</option>
			{{%loop start fou}}
			<option value="{{$fou}}" {{$fou_sel}}>{{$fou_label}}</option>
			{{%loop end}}
		</select>
		
		<label class="left" for="filter_radnik">radnik:</label>
		<select name="filter_radnik" id="filter_radnik">
			<option value="-1">---</option>
			{{%loop start radnik_id}}
			<option value="{{$radnik_id}}" {{$radnik_selected}}>{{$radnik_ime}}&nbsp;{{$radnik_prezime}}</option>
			{{%loop end}}
		</select>
		
		
		
		<label class="left" for="filter_ishod">ishod:</label>
		<select name="filter_ishod" id="filter_ishod">
			<option value="-1">---</option>
			{{%loop start ishod_id}}
			<option value="{{$ishod_id}}" {{$ishod_selected}}>{{$ishod_name}}</option>
			{{%loop end}}
		</select>
		
		<input type="submit" value="filter" />
		<span id="info">{{$info}}</span>
	</form>
	<div id="mainContainer" class="area">
		{{$comment_start}}
		<table>
			<tr class="head">
				<td>datum</td>
				<td>ugovor</td>
				<td>komitent</td>
				<td>kontakt</td>
				<td>odgovor</td>
				<td>obećano</td>
				<td>radnik</td>
				<td>napomena</td>
				<td width="15%">ishod</td>
			</tr>
			{{%loop start row}}
			<tr>
				<td>{{$datum}}</td>
				<td><a title="detalji ugovora..." href="javascript:void(0)" onclick="ugovorDetails('{{$ugovor}}')">{{$ugovor}}</a></td>
				<td class="komitent">
					<a title="{{$komitent_id}}&nbsp;- svi podaci..." href="javascript:void(0)"onclick="blankTarget('LoadRSDoc(\'komitenti.php?a=displayOne&id={{$komitent_id}}\',\'setContent\')')">
						{{$komitent}}
					</a>
				</td>
				<td>{{$kontakt}}</td>
				<td>{{$odgovor}}</td>
				<td align="right">{{$obecana_uplata}}</td>
				<td>{{$radnik}}</td>
				<td class="napomena">{{$napomena}}</td>
				<td>{{$ishod}}</td>
			</tr>
			{{%loop end}}
		</table>
		{{$comment_end}}
	</div>
</div>